USE [Sql For Developers]
GO

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_Staff_Roles]') AND parent_object_id = OBJECT_ID(N'[dbo].[Staff]'))
ALTER TABLE [dbo].[Staff] DROP CONSTRAINT [FK_Staff_Roles]
GO

USE [Sql For Developers]
GO

/****** Object:  Table [dbo].[Staff]    Script Date: 05/05/2009 13:52:18 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Staff]') AND type in (N'U'))
DROP TABLE [dbo].[Staff]
GO

USE [Sql For Developers]
GO

/****** Object:  Table [dbo].[Staff]    Script Date: 05/05/2009 13:52:18 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Staff](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[FirstName] [varchar](50) NOT NULL,
	[LastName] [varchar](100) NOT NULL,
	[Salary] [int] NOT NULL,
	[Role] [int] NOT NULL,
 CONSTRAINT [PK_Staff] PRIMARY KEY CLUSTERED 
(
	[ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[Staff]  WITH CHECK ADD  CONSTRAINT [FK_Staff_Roles] FOREIGN KEY([Role])
REFERENCES [dbo].[Roles] ([ID])
GO

ALTER TABLE [dbo].[Staff] CHECK CONSTRAINT [FK_Staff_Roles]
GO

INSERT INTO [dbo].Staff (FirstName, LastName, Salary, Role)
VALUES ('Bob', 'Smith', 14000, 1);
INSERT INTO [dbo].Staff (FirstName, LastName, Salary, Role)
VALUES ('Rachel', 'Jackson', 14500, 1);
INSERT INTO [dbo].Staff (FirstName, LastName, Salary, Role)
VALUES ('Stephen', 'Byrne', 14250, 1);
INSERT INTO [dbo].Staff (FirstName, LastName, Salary, Role)
VALUES ('Elaine', 'Israel', 13000, 1);
INSERT INTO [dbo].Staff (FirstName, LastName, Salary, Role)
VALUES ('Janet', 'Henry', 13500, 1);
INSERT INTO [dbo].Staff (FirstName, LastName, Salary, Role)
VALUES ('Mildred', 'Johnson', 14000, 1);
INSERT INTO [dbo].Staff (FirstName, LastName, Salary, Role)
VALUES ('Jeffry', 'Rivera', 16000, 2);
INSERT INTO [dbo].Staff (FirstName, LastName, Salary, Role)
VALUES ('Sarah', 'Lattimer', 16500, 2);
INSERT INTO [dbo].Staff (FirstName, LastName, Salary, Role)
VALUES ('Jon', 'Caton', 30000, 4);
INSERT INTO [dbo].Staff (FirstName, LastName, Salary, Role)
VALUES ('Arden', 'Dearing', 60000, 5);

SELECT * FROM Staff;